Synthetic Source internal, dependency operation name, enhance event message#3087
Merged
rajkumar-rangaraj merged 7 commits intomainfrom Jan 27, 2026
Merged
Synthetic Source internal, dependency operation name, enhance event message#3087rajkumar-rangaraj merged 7 commits intomainfrom
rajkumar-rangaraj merged 7 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes three main improvements to the Application Insights SDK: (1) changes the SyntheticSource property from public to internal, (2) adds operation name tracking to dependency telemetry for better correlation, and (3) refactors EventSource logging methods with more specific names and clearer error messages.
Changes:
- Refactored EventSource methods from generic
LogErrorto specific methods:FailedToAddTelemetry,InvalidTracesPerSecondConfigured,InvalidSamplingRatioConfigured, andTelemetryConfigurationFailurewith improved error messages - Added operation name tag to dependency telemetry tracking to maintain parity with request telemetry
- Changed SyntheticSource property visibility from public to internal in OperationContext
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationContext.cs | Changed SyntheticSource property from public to internal |
| BASE/src/Microsoft.ApplicationInsights/TelemetryClient.cs | Added operation name tag to dependency telemetry activities |
| NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Extensibility/Implementation/Tracing/AspNetCoreEventSource.cs | Replaced generic LogError with specific event methods and improved messages |
| NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Extensions/ApplicationInsightsExtensions.cs | Updated to use new specific EventSource methods |
| NETCORE/src/Microsoft.ApplicationInsights.WorkerService/Implementation/Tracing/WorkerServiceEventSource.cs | Replaced generic LogError with specific event methods and improved messages |
| NETCORE/src/Microsoft.ApplicationInsights.WorkerService/ApplicationInsightsExtensions.cs | Updated to use new specific EventSource methods |
| NETCORE/src/Shared/Extensions/ApplicationInsightsExtensions.cs | Updated to use new TelemetryConfigurationFailure method |
Comments suppressed due to low confidence (2)
NETCORE/src/Microsoft.ApplicationInsights.WorkerService/Implementation/Tracing/WorkerServiceEventSource.cs:87
- The XML documentation comment incorrectly refers to "AspNetEventSource" but this is in the WorkerServiceEventSource class. It should be "Keywords for the WorkerServiceEventSource."
/// <summary>
/// Keywords for the AspNetEventSource.
/// </summary>
BASE/src/Microsoft.ApplicationInsights/TelemetryClient.cs:635
- The documentation for TrackDependency needs to be updated to include the microsoft.operation_name override attribute that is being added in this PR. The TrackRequest method documentation already includes this attribute (line 769), and TrackDependency should have similar documentation. Add a new bullet point: "microsoft.operation_name → RemoteDependencyData.Context.Operation.Name" to the Override Attributes list around line 577.
if (!string.IsNullOrEmpty(telemetry.Name))
{
dependencyTelemetryActivity.SetTag(SemanticConventions.AttributeMicrosoftDependencyName, telemetry.Name);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ApplicationInsights.AspNetCore/Extensibility/Implementation/Tracing/AspNetCoreEventSource.cs
Show resolved
Hide resolved
BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/OperationContext.cs
Show resolved
Hide resolved
harsimar
approved these changes
Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Issue # .
Changes
(Please provide a brief description of the changes here.)
Checklist
For significant contributions please make sure you have completed the following items:
The PR will trigger build, unit tests, and functional tests automatically. Please follow these instructions to build and test locally.
Notes for authors: